imwayland: Suppport terminal purpose
authorDorota Czaplejewicz <dorota.czaplejewicz@puri.sm>
Thu, 12 Dec 2019 14:37:51 +0000 (14:37 +0000)
committerDorota Czaplejewicz <dorota.czaplejewicz@puri.sm>
Thu, 12 Dec 2019 14:37:51 +0000 (14:37 +0000)
gtk/gtkenums.h
gtk/gtkimcontextwayland.c

index 9bd6f1632eddf02a70f98e2c3b095cb52cacbfa9..c23bf05b179a185a6f660b773553f83a3f66b4e0 100644 (file)
@@ -862,6 +862,7 @@ G_END_DECLS
  * @GTK_INPUT_PURPOSE_NAME: Edited field expects the name of a person
  * @GTK_INPUT_PURPOSE_PASSWORD: Like @GTK_INPUT_PURPOSE_FREE_FORM, but characters are hidden
  * @GTK_INPUT_PURPOSE_PIN: Like @GTK_INPUT_PURPOSE_DIGITS, but characters are hidden
+ * @GTK_INPUT_PURPOSE_TERMINAL: Allow any character, in addition to control codes
  *
  * Describes primary purpose of the input widget. This information is
  * useful for on-screen keyboards and similar input methods to decide
@@ -893,7 +894,8 @@ typedef enum
   GTK_INPUT_PURPOSE_EMAIL,
   GTK_INPUT_PURPOSE_NAME,
   GTK_INPUT_PURPOSE_PASSWORD,
-  GTK_INPUT_PURPOSE_PIN
+  GTK_INPUT_PURPOSE_PIN,
+  GTK_INPUT_PURPOSE_TERMINAL,
 } GtkInputPurpose;
 
 /**
index 647f238d1c7dc9edebecac4dd4d91e3f35b367a0..3344a68cad5ee355d802127a3da1e7c2ca0d7f3e 100644 (file)
@@ -424,6 +424,8 @@ translate_purpose (GtkInputPurpose purpose)
       return ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_PASSWORD;
     case GTK_INPUT_PURPOSE_PIN:
       return ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_PIN;
+    case GTK_INPUT_PURPOSE_TERMINAL:
+      return ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_TERMINAL;
     default:
       g_assert_not_reached ();
     }